package cn.cctvcc.system.controller;

import cn.cctvcc.core.domain.R;
import cn.cctvcc.system.api.domain.SysEmail;
import cn.cctvcc.system.service.SysEmailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @description: 邮件管理控制层
 * @author: Jiang
 * @create: 2021-09-28 11:00
 */
@RestController("/sysEmail")
public class SysEmailController {

    @Autowired
    private SysEmailService sysEmailService;

    /**
     * 新增
     * @param sysEmail
     * @return
     */
    @PostMapping(value = "/add")
    public R<?> add(@RequestBody SysEmail sysEmail) {
        return R.ok(sysEmailService.add(sysEmail));
    }

}
